package com.springboot.auth.authorization.provider;

import com.springboot.auth.authorization.model.common.ResponseModel;
import com.springboot.auth.authorization.model.vo.Authcode;
import com.springboot.auth.authorization.model.vo.CaptchaVO;
import org.springframework.stereotype.Component;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@Component
public class AuthcodeProviderFallback implements AuthcodeProvider {

    @Override
    public ResponseModel get(CaptchaVO captchaVO) {
        return ResponseModel.errorMsg("调用失败，服务降级");
    }

    @Override
    public ResponseModel check(CaptchaVO captchaVO) {
        return ResponseModel.errorMsg("调用失败，服务降级");
    }

    @Override
    public ResponseModel verify(CaptchaVO captchaVO) {
        return ResponseModel.errorMsg("调用失败，服务降级");
    }

    @Override
    public String getAuthcode(Authcode authcode) {
        return "调用失败，服务降级";
    }
}
